﻿////////////////////////////////////////////////////////////////////////////////////
//
//   CopyFileReplace.h
//   Description: replace macros in file and save.
//   Revision History: 03/25/2020 created by Zhang Hong
//
////////////////////////////////////////////////////////////////////////////////////

#ifndef _COPYFILEREPLACE_H_
#define _COPYFILEREPLACE_H_

#include "ParseDTD.h"
#include <QString>

struct PrjMacro
{
	QString $TempleteDir;
	QString $Project;
	QString $PROJECT;
	QString $project;
	QString $QT32;
	QString $QT64;
	QString $TopNode;
	QString $UUID;
};

struct NodeMacro
{
	QString $Node;
	QString $NODE;
	QString $Prop;
};


//创建目录，宏替换，写文件，文件名也需要替换，目录末尾带"/"
int CopyFileReplace(const QString &srcFile, const QString &desFile, 
	const PrjMacro &prj, const std::list<CElement> &elmList, const CElement &curElm);

QString ReplaceFile(const QString &content, const QString &Project, const QString &project, const QString &Node);


#endif
